using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

namespace PrismMetroSample.Infrastructure
{
    public class BaseDialogViewModel : BaseViewModel, IDialogAware
    {
        private string _title;
        public string Title
        {
            get { return _title; }
            set { SetProperty(ref _title, value); }
        }

        public event Action<IDialogResult> RequestClose;

        public virtual void RaiseRequestClose(IDialogResult dialogResult)
        {
            RequestClose?.Invoke(dialogResult);
        }

        public virtual bool CanCloseDialog()
        {
            return true;
        }

        public virtual void OnDialogClosed()
        {

        }

        public virtual void OnDialogOpened(IDialogParameters parameters)
        {

        }
  
    }
}